package com.hdu.point_offer;

public class lcr187 {
    class Solution {
        public int iceBreakingGame(int num, int target) {
            return ysf(num, target, num);
        }

        int ysf(int num, int target, int i)
        {
            if (i == 1)
            {
                return (target - 1 + num) % num;
            }
            else
            {
                return (ysf(num - 1, target, i - 1) + target) % num;
            }
        }
    }
}
